
package com.be.beadmin.project.repository;

import com.be.beadmin.project.entity.FileInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
* @author zmy
* @date 2023-02-15
**/
public interface FileInfoRepository extends JpaRepository<FileInfo, String>, JpaSpecificationExecutor<FileInfo> {

    FileInfo findFileInfoByIdAndDelete(String id, Integer delete);

    FileInfo findFileInfoById(String id);

    FileInfo findFileInfoByFileName(String fileName);

    FileInfo findFileInfoByFileNameAndProjectNameAndVersion(String projectName,String fileName,String version);

    int countFileInfosByFileNameAndProjectNameAndDelete(String fileNam,String projectNam,Integer delete);

    int countFileInfosByFileNameAndVersionAndDelete(String filename,String version,Integer delete);

    FileInfo findFileInfoByInfoIdAndCategory(String infoId, String category);

    int countFileInfosByInfoIdAndCategory(String infoId, String category);
}